//
//  ARAboutView.m
//  CGTN
//
//  Created by YangTengJiao on 2019/6/6.
//  Copyright © 2019 YangTengJiao. All rights reserved.
//

#import "ARAboutView.h"
@implementation ARAboutView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}

- (void)creatView {
    self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.7];
    
    self.backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.backButton.frame = CGRectMake(15, (KIsiPhoneX?35:22.5), 35, 35);
    [self.backButton setImage:kGetARImage(@"返回") forState:UIControlStateNormal];
    [self.backButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:self.backButton];
    

    self.textView = [[UITextView alloc] initWithFrame:CGRectMake(75, 90, ScreenTJWidth-75-75, ScreenTJHeight-90-90)];
    self.textView.backgroundColor = [UIColor clearColor];
    self.textView.scrollEnabled = YES;
    self.textView.textColor = [UIColor whiteColor];
    self.textView.font = FontTJ(12);
    self.textView.text = @"About\n    Reference\n    CAAC's airline relocation plans as of April 2019\n    The data for “Multi-airport cities” were compiled by CGTN from the CAAC, the municipal official website of each city, the countries' statistics agencies and the airports' official websites.\n\n    Production team\n    Supervisor: Jiang Heping\n    Managing Director: Zhang Shilei\n    CGTN Digital CTO: Li Jian\n    Senior Product Manager: Peng Peng\n    Project Coordinator: Wang Guoxing\n    Designers: Hu Xinyi, Li Wenyi\n    Developers: Liu Shuo, Zhou Jiasong, Qin Jin, Lin Yu, Chu Hongyang, Zhang Yupeng\n    Executive Producer: Si Nan\n    Chief Editor: Chen Ran\n    Senior Consultant: Xia Jixuan\n    Editors: Dong Xue, Nick Moore, Pan Zhaoyi, Li Jingjing, Wang Kailin, Chen Shi, Wang Zengzheng, Wu Chutian\n    Data Visualization: Zhao Hong, Li Wenyi, Hu Xinyi, Hu Yiwei\n    Cameraman: Qi Jianqiang\n    Animation: Ma Zhiyuan, Hu Xinyi\n\n    Special Thanks\n    Civil Aviation Administration of China\n    Capital Airport Holding Company\n    Beijing Institute of Architectural Design (Group) Co., Ltd\n    Beijing Urban Construction Group Co., Ltd";
    self.textView.editable = NO;
    [self addSubview:self.textView];
}

- (void)backAction {
    if (self.viewBlock) {
        self.viewBlock(@"back");
    }
    [self removeFromSuperview];
}


@end
